//
//  XSQNavigationController.swift
//  Hpyerglycemic
//
//  Created by  on 2017/12/7.
//  Copyright © 2017年 Anna. All rights reserved.
//

import UIKit
import EachNavigationBar

class XSQNavigationController: UINavigationController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.navigation.configuration.isEnabled = true
        self.navigation.configuration.titleTextAttributes = [.foregroundColor: UIColor.black]
        self.navigation.configuration.barTintColor = UIColor.white
        self.navigation.configuration.tintColor = UIColor.black
//        self.navigation.configuration.shadowImage = UIImage(named: "shadow")
        self.navigation.configuration.backItem = UINavigationController.Configuration.BackItem(style: .image(UIImage.init(named: "back_black")))
        self.navigation.configuration.isShadowHidden = true
        self.navigation.configuration.statusBarStyle = .lightContent
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    override func pushViewController(_ viewController: UIViewController, animated: Bool) {
        // 在push之前隐藏tabBar
        if self.viewControllers.count > 0 {
            viewController.hidesBottomBarWhenPushed = true
        }
        super.pushViewController(viewController, animated: animated)
    }
}
